package com.example.myapp.navigation

import androidx.navigation.NavController

// 导航扩展函数
fun NavController.navigateToHome() {
    navigate(Screen.Home.route)
}

fun NavController.navigateToAbout() {
    navigate(Screen.About.route)
}

fun NavController.navigateToMain() {
    navigate(Screen.Main.route) {
        popUpTo(Screen.Main.route) { inclusive = true }
    }
}

fun NavController.goBack() {
    popBackStack()
}

// 导航常量
object NavigationConstants {
    const val MAIN_ROUTE = "main"
    const val HOME_ROUTE = "home"
    const val ABOUT_ROUTE = "about"
} 